repo.or.cz
/
andmenj-acm.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
More problems
[andmenj-acm.git]
/
11296 - Counting Solutions of an Integer Equation
/
p11296.cpp
blob
e9fd1b2d48ce71c5a0a2171fe12e02193e0f5d38
1
#include <iostream>
2
using namespace
std
;
3
int
main
(){
4
int
n
;
5
while
(
cin
>>
n
){
6
long long
s
=
0
;
7
if
(
n
%
2
==
1
) --
n
;
8
while
(
n
>=
0
){
9
s
+= (
n
/
2
)+
1
;
10
n
-=
2
;
11
}
12
cout
<<
s
<<
endl
;
13
}
14
return
0
;
15
}